package com.example.wyy;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.os.Bundle;
import android.view.Gravity;
import android.widget.LinearLayout;
import android.widget.TextView;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

import view.RoundImage;

public class MineActivity extends AppCompatActivity {
    private LinearLayout root;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.activity_mine);
        root = findViewById(R.id.layimage);

        Bitmap bitmap = BitmapFactory.decodeResource(getResources(),R.mipmap.img_12);
        TextView username = new TextView(this);
        username.setText("username");
        username.setTextColor(Color.RED);
        username.setTextSize(25);
        username.setGravity(Gravity.START);
        RoundImage roundImage = new RoundImage(this, bitmap);
        root.addView(roundImage);
        root.addView(username);
        roundImage.invalidate();

    }
}